package com.sky.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @Author BUPT-Dingchang
 * @Create 2024/3/10 16:37
 * ClassName: MyTask
 * Description:  自定义定时任务了类
 */

@Component
@Slf4j
public class MyTask {


    /**
     * 定时任务---每5秒执行一次
     */
    //@Scheduled(cron = "0/5 * * * * ?")
    //public void task1() {
    //    log.info("定时任务开始执行：{}", new Date());
    //}

}
